home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-15 | 4.1 KB | 114 lines | [TEXT/MPS ] |
- // Copyright © 1992-1993 Apple Computer. All rights reserved.
- // :Inc:SpeechGala.h -- 1993 March 1
-
- #ifndef __SpeechGala__
- #define __SpeechGala__
-
- #ifndef _Speech_
- #include "Speech.h"
- #endif
-
-
- // Gala Tea extended selectors and arguments for GetSpeechInfo
- // and SetSpeechInfo.
-
- enum { // Gala Tea extended selectors.
- soGalaSynthID = 'gala', // For the Gala Tea synthesizer.
- soGalaFraction = 'frac', // Method of speaking fractions.
- soGalaAllophoneSymbols = 'alsy', // Get allophone symbols.
- soGalaConvertToAllo = 'cval', // Convert to allophones.
- soGalaConvertToWave = 'cvwv', // Convert to waveforms.
- soGalaAllophoneCallBack = 'alcb', // Call routine for each allophone.
- soGalaSentenceCallBack = 'secb', // Call routine for each sentence.
- soGalaLowPassFilter = 'lopf', // Low pass filter usage.
- soGalaSampleSize = 'ssiz', // Size of output sound samples.
- soGalaProsody = 'pros', // Prosody switch.
- soGalaVoiceBasePitch = 'vbas', // Central pitch for voice.
- soGalaVoiceModulation = 'vmod' // Pitch modulation range for voice.
- };
-
- enum { // Input mode extension.
- soGalaInputAllo = 'ALLO' // Allophone input.
- };
-
- enum { // Number mode extensions.
- soGalaNumbersPairs = 'PAIR', // Speak digits in groups of two.
- soGalaNumbersThrees = 'THRE' // Speak digits in groups of three.
- };
-
- enum { // Speak fractions extension.
- soGalaFractionsOn = 'ON', // Pronounce as fractions.
- soGalaFractionsOff = 'OFF' // Say number slash number.
- };
-
- enum { // Low pass filter extension.
- soGalaLowPassFilterDefault = 'NORM',// Default for this machine.
- soGalaLowPassFilterBest = 'BEST', // Highest quality.
- soGalaLowPassFilterNone = 'NONE', // No filtering.
- soGalaLowPassFilterSW08 = 'SW08' // Eighth-order software filter.
- };
-
- enum { // Prosody switch extension.
- soGalaProsodyDefault = 'NORM', // Default for this machine.
- soGalaProsodyBest = 'BEST', // Highest quality.
- soGalaProsodyOn = 'ON', // Speak in monotone.
- soGalaProsodyOff = 'OFF' // Speak naturally.
- };
-
- enum { // Sound sample size extension.
- soGalaSamplesDefault = 'NORM', // Default for this machine.
- soGalaSamplesBest = 'BEST', // Highest quality.
- soGalaSamples8Bit = 'SS08', // 8-bit samples.
- soGalaSamples16Bit = 'SS16' // 16-bit samples.
- };
-
-
- // This is the Component sub-type for the Gala Tea speech synthesizer.
-
- enum {
- kGTVerCompType = kTextToSpeechSynthType,
- kGTVerSubType = 0,
- kGTVerManuf = soGalaSynthID
- };
-
-
- // Types used as arguments to GetSpeechInfo and SetSpeechInfo.
-
- typedef struct GTXtndData { // Extended info for several selectors.
- OSType synthID; // soGalaSynthID ('gala').
- OSType selector; // Extended selector (e.g. 'frac').
- long info2; // Extended information or pointer to it.
- } GTXtndData;
-
- typedef struct GTXtndConvertData { // Extended info for conversion selectors.
- // input values
- OSType synthID; // soGalaSynthID ('gala').
- OSType selector; // Extended selector ('cval' or 'cvwv').
- Ptr inputBuffer; // Address of the data to convert.
- long inputLen; // Length of the data to convert.
- long controlFlags; // 0 (for last buffer) or kNoEndingProsody.
- Handle outputBuffer; // Handle to buffer for the output.
- // return values
- long outputLen; // Returns the size of the output.
- Boolean moreOutput; // Returns true if outputBuffer is too small
- // for all the output at at once.
- } GTXtndConvertData;
-
- typedef pascal void (*GTAlcbCallBackPtr)( // Allophone callback routine.
- SpeechChannel chan, // Channel being spoken on.
- unsigned long refCon, // Application value set via 'refc'.
- unsigned short curAllo, // Current allophone code.
- short alloDur, // Duration of the current allophone in milliseconds.
- short remDur, // Remaining duration of the current allophone.
- unsigned short nextAllo // Next allophone code.
- );
-
- typedef pascal void (*GTSecbCallBackPtr)( // Sentence callback routine.
- SpeechChannel chan, // Channel being spoken on.
- unsigned long refCon, // Application value set via 'refc'.
- unsigned long sentPos, // Byte count to the start of the sentence.
- unsigned short sentLen // Byte length of this sentence.
- );
-
- #endif // __SpeechGala__
-